<template>
 <div>
    <el-empty description="欢迎来到学科竞赛管理系统，请点击右侧操作栏进行操作" />
 </div>
</template>
<script>
export default {
  // 创建了一个组件，组件的名字为name
  name: 'Home',
  data () {
    return {
      role: ''
    }
  },
  created () {
    const role = window.sessionStorage.getItem('role')
    this.role = role
    if (role === '管理员') {
      this.$router.push('/home/student/manager')
    }
    if (role === '老师') {
      this.$router.push('/home/search/teacher')
    }
    if (role === '学生') {
      this.$router.push('/home/task/student')
    }
  },
  methods: {
  }
}
</script>
<style>
</style>